<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
      {{1565588398790}}
    <br>
    {{
    new Date(birthday).getFullYear() + '-'+ new Date(birthday).getMonth()+ '-' + new Date(birthday).getDate()
    }}
    <br>


</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>

    var dataObj={
        birthday:1565588398790
    };


   var vm = new Vue({
       el:"#app",   //el，element：即要渲染的页面元素
       data:dataObj,
       methods: {
           getBirthday:function () {
               console.log("getBirthday");
               var date = new Date(this.birthday);
               return date.getFullYear()+"-"+date.getMonth()+"-"+date.getDate();
           }
       },
       /*属性，不是方法*/
       computed:{
           getBirth:function () {
               console.log("getBirth");
               var date = new Date(this.birthday);
               return date.getFullYear()+"-"+date.getMonth()+"-"+date.getDate();
           }

       }
   });
</script>
</body>
</html>